#include<stdio.h>
#include<stdlib.h>
#include "dominion.h"


void testupdateCoins(){

	struct gameState* gs;

	gs=newGame();

	int player=1;

	gs->coins=0;
	gs->handCount[1]=3;
	gs->hand[1][0]=copper;
	gs->hand[1][1]=silver;
	gs->hand[1][2]=gold;

	updateCoins(player,gs,0);
	if(gs->coins==6){
		printf("updateCoins(): PASS when test adding copper, silver, gold\n");
	}
	else{

		printf("updateCoins(): FAIL when test adding copper, silver, gold\n");
	}


	gs->coins=0;
	gs->handCount[1]=3;
	gs->hand[1][0]=copper;
	gs->hand[1][1]=silver;
	gs->hand[1][2]=gold;

	updateCoins(player,gs,1);
	if(gs->coins==7){
		printf("updateCoins(): PASS when test adding copper, silver, gold and bonus\n");
	}
	else{

		printf("updateCoins(): FAIL when test adding copper, silver, gold and bonus\n");
	}


}


int main(int argc, char *argv[])
{

	testupdateCoins();
    return 0;
}



